package com.diankangwo.factory.dao;

import com.diankangwo.factory.entity.TdFactory;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface TdFactoryMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(TdFactory record);

    int insertSelective(TdFactory record);

    TdFactory selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TdFactory record);

    int updateByPrimaryKey(TdFactory record);

    /**
     * 根据条件查询厂家列表
     * @param map
     * @return
     */
    List<TdFactory> queryList(Map<String,Object> map);

    /**
     * 根据条件查询厂家总数
     * @param map
     * @return
     */
    int queryTotal(Map<String,Object> map);

    /**
     * 按二级分类ID 查询厂家
     * @param id
     * @return
     */
    TdFactory selectByClassId(Integer id);
}